import request from '@/utils/request'

//获取消息数据
export function getNoticePageList(data) {
	return request({
		method: 'get',
		url: 'sysNotice/query',
		params: data,
	})
}

//获取私信数据
export function getPrivateLetterData(data) {
	return request({
		method: 'get',
		url: 'sysNotice/queryNoticeByOneSelf',
		params: data,
	})
}

//获取消息详情	
export function getNoticeDetail(data) {
	return request({
		method: 'get',
		url: 'sysNotice/query/' + data,
	})
}

//新增消息
export function addNotice(data) {
	return request({
		method: 'post',
		url: 'sysNotice/add',
		data,
	})
}

//删除消息
export function deleteNotice(id) {
	return request({
		method: 'get',
		url: 'sysNotice/deleteById/' + id
	})
}

//删除私信
export function deletePrivateLetter(ids) {
	return request({
		method: 'post',
		url: 'sysNotice/deleteByOneSelf',
		params: { ids }
	})
}

//修改消息
export function updateNotice(data) {
	return request({
		method: 'post',
		url: 'sysNotice/update',
		data,
	})
}